﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using SqlSugar;

namespace Server.Utils
{
    public class DBHelper
    {
        public static string ConnString = "";

        public static SqlSugarClient Get()
        {
            // string fileName = AppDomain.CurrentDomain.BaseDirectory + "\\data.db";
            return new SqlSugarClient(new ConnectionConfig
            {
                DbType = DbType.MySql,
                InitKeyType = InitKeyType.Attribute,
                IsAutoCloseConnection = true,
                ConnectionString = ConnString
            });
        }
    }
}